<?php

class Model_DbTable_Exhibition extends Zend_Db_Table
{

    protected $_name = 'exhibition';

    protected $_rowClass = 'Model_Exhibition';
    
    
    public function getCurrentExhibition(){
    	$currentDate = date("Y-m-d");
    	
    	$exhibition = $this->fetchRow('start_time <= "'.$currentDate.'" AND end_time >= "'.$currentDate.'"');
    	
    	return $exhibition;
    }
    
    public function getPastExhibition(){
    	$cureentDate = date("Y-m-d");
    	$exhibition = $this->fetchAll("end_time < \"$cureentDate\"");
    	return $exhibition;
    	
    }
    


}

